package cn.hx.util;
 

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.util.UrlPathHelper;
 
 
@Configuration
public class WebConfig implements WebMvcConfigurer{
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**")
                .excludePathPatterns("/index","/","/index/userLogin","/validCode/code","/user/regist",
                        "/user/forget_password","/user/news/queryList","/user/news","/user/newsDetail",
                        "/css/**","/fonts/**","/img/**","/js/**","/ueditor/**",
                        "/re_approve/**","/item/revealFull","/user/sendEmail","/user/editPassword",
                        "/user/newsDetail","user/newsDetail1","/user/uploadNewsImg");
    }
 
}